﻿namespace Reviewer.Entities
{
    using System;
    using System.Data.SqlClient;
    using System.Runtime.Serialization;
    using Reviewer.Entities.MetadataInfo;

    /// <summary>
    /// Format entity
    /// </summary>
    [MetadataType(SortColumn = "Name", SortOrder = SortOrder.Ascending)]
    [DataContract(Namespace = "Reviewer.Entities")]
    public sealed class NewsType : IMetadataType, IExtensibleDataObject
    {
        [DataMember(IsRequired = true, Order = 1)]
        public int Id { get; set; }

        [MetadataTextProperty(IsPartOfUniqueCheck = true, MaxLength = 250)]
        [DataMember(IsRequired = true, Order = 2)]
        public String Name { get; set; }

        #region IExtensibleDataObject Members
        ExtensionDataObject IExtensibleDataObject.ExtensionData { get; set; }
        #endregion
    }
}
